<style scoped lang="less">
    @import 'category.css';
</style>
<template>
    <div class="category-container">
        <div @click="jump(index)" class="category-item" v-for="(item,index) in list">
            <img class="category-item-img" :src="GLOBAL.getUrl(item.img!=null?item.img[0]:item.oriimg[0],true,false)"/>
            <span v-if="item.title!==undefined&&item.title!==null&&item.title!==''" class="category-item-title">{{item.title}}</span>
        </div>
    </div>
</template>
<script>
    import {actionDis} from "../../../libs/action-tools";

    export default {
        name: 'qcategory',
        data() {
            return {
                alist: []
            }
        },
        props: {
            list: {
                type: Array,
                default: function () {
                    return [];
                }
            }
        },
        methods: {
            jump(index) {
                actionDis(this.list[index], this)
            }
        }
    }
</script>
